#include <bits/stdc++.h>
using namespace std;
const long double eps = 1e-16;
const long long MOD = (int)998244353;
const long long INF = 2 * (long long)1e16 + 3;
const int MAXN = 200002;
bool sortby1dthen2a(const pair<int, int>& a, const pair<int, int>& b) {
  return ((a.first > b.first) || (a.first == b.first) && (a.second < b.second));
}
inline long long mod(long long x, long long m = MOD) {
  if (x < 0) x += m;
  return (x % m);
}
int n, m;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n >> m;
  for (int i = 0; i < n / 2; ++i) {
    for (int j = 0; j < m; ++j) {
      cout << i + 1 << " " << j + 1 << "\n";
      cout << n - i << " " << m - j << "\n";
    }
  }
  if (n % 2) {
    for (int j = 0; j < m / 2; ++j) {
      cout << n / 2 + 1 << " " << j + 1 << "\n";
      cout << n / 2 + 1 << " " << m - j << "\n";
    }
    if (m % 2) cout << n / 2 + 1 << " " << m / 2 + 1 << "\n";
  }
  return 0;
}
